package com.item.news.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import redis.clients.jedis.Jedis;

/**
 * @ClassName RedisController
 * @Description TODO
 * @Author WangDong
 * @Date 2019/2/14 13:11
 * @Version 1.0
 **/
@RestController
public class RedisController {


    @RequestMapping("/getRedisInfo")
    public String getRedisInfo(){
        Jedis jedis = new Jedis("localhost");
        System.out.println("redis 存储的字符串为: "+ jedis.get("w3ckey"));
        return jedis.get("news");
    }

}
